package com.hqyj.mana.service.impl;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hqyj.mana.dao.SalaryMapper;
import com.hqyj.mana.pojo.BasicInformation;
import com.hqyj.mana.pojo.Salary;
import com.hqyj.mana.service.SalaryService;

@Service
public  class SalaryServiceimpl implements SalaryService {	
	@Autowired
	SalaryMapper mapper;
	@Override
	public List<Salary> selectAllSalary(String userName,String userId) {
		// TODO Auto-generated method stub
		List<Salary> list = mapper.selectAllSalary(userName, userId);
		return list;
	}
	@Override
	public boolean add(Salary user) {
		//System.out.println(user.getBasicVage());
		if(mapper.insertSelective(user)>0){
			return true;
		}
		return false;
	}
	@Override
	public boolean update(Salary user) {
		if(mapper.updateByPrimaryKeySelective(user)>0){
			return true;
		}
		return false;
	}
	@Override
	public boolean del(Integer id) {
		if(mapper.deleteByPrimaryKey(id)>0){
			return false;
		}
		return true;
	}
	@Override
	public HashMap<String, Object> hashCode(Object user) {
		// TODO Auto-generated method stub
		return null;
	}


	}


